﻿<template>
    <full-screen-dialog
        title="操作记录"
        v-model="visible"
        :width="1300"
        destroy-on-close
        @closed="$emit('closed')"
    >
        <el-form :model="entityObj" :rules="rules" :disabled="mode == 'Show'" ref="dialogForm">
            <el-row>
                <el-col :span="24">
                    <el-form-item>
                        <el-table
                            :data="operateLogs"
                            border
                            style="width: 100%"
                            show-summary
                            :row-class-name="setRowClass"
                        >
                            <el-table-column label="操作时间" min-width="110" prop="createTime">
                                <template #default="scope">{{scope.row.createTime?.slice(0,10)}}</template>
                            </el-table-column>
                            <el-table-column label="操作单号" min-width="160" prop="operateOrderCode"></el-table-column>
                            <el-table-column label="操作内容" min-width="160" prop="operateOrderLogDesc"></el-table-column>
                            <el-table-column label="操作人" min-width="110" prop="accountName"></el-table-column>
                            <el-table-column label="操作详情" min-width="400" prop="remarks"></el-table-column>
                        </el-table>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
    </full-screen-dialog>
</template>

<script>
import tool from "@/utils/tool";
export default {
    emits: ["success", "closed"],
    components: {
    },
    data() {
        return {
            visible:false,
            mode: "Task",
            entityObj: {},
            operateLogs:[],
        };
    },
    computed: {

    },
    methods: {
        //显示=
        open(mode = "Add") {
            this.mode = mode;
            this.visible = true;
            return this;
        },
        //表单注入数据
        async setData(data) {
            try {
                var returnValue = await this.$API.auth.PostProcessApi.post(
                    `operate-order-log/list`, {...data}
                );
                if (returnValue.status == 200) {
                    this.operateLogs = returnValue.response;
                    console.log(this.operateLogs)
                } else {
                    this.$message.error("操作失败:" + returnValue.msg);
                }
            } catch (error) {
                this.loading = false;
                return false;
            }
        },
    },
    async mounted() {},
};
</script>
